package cn.hj.mapper;


import cn.hj.beans.School;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface SchoolMapper {
    @Select("select * from T_School where s_id=#{id}")
    @Results(id = "school",value={@Result(column = "s_id",property = "id"),@Result(column = "s_name",property = "name")})
    School getSchoolById(int id);
    @Select("select * from T_School")
    @ResultMap("school")
    List<School> getAllSchools();

}
